const navContainer = document.querySelector('.nav-container');

// 滚轮滚动控制
navContainer.addEventListener('wheel', (e) => {
    e.preventDefault();
    navContainer.scrollTop += e.deltaY * 0.6;
});

// 键盘方向键控制
document.addEventListener('keydown', (e) => {
    const step = 60;
    switch(e.key) {
        case 'ArrowUp':
            navContainer.scrollTop -= step;
            break;
        case 'ArrowDown':
            navContainer.scrollTop += step;
            break;
        case 'PageUp':
            navContainer.scrollTop -= navContainer.clientHeight;
            break;
        case 'PageDown':
            navContainer.scrollTop += navContainer.clientHeight;
            break;
    }
});